﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using AMS.DataAccess.Sys.Interfaces;
using AMS.DataAccess.Sys.BO;

public partial class User_ShowUserSimple : BaseWorkPage
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!Utils.ParseIntQueryString(Request, "id", ref itemId))
        {
            return;
        }

        if (!IsPostBack)
        {
            DoDataBind();
        }
    }

    int itemId;

    private void DoDataBind()
    {
        IUserManager userMgr = ManagerFactory.CreateUserManager();
        UserInfo user = userMgr.GetUser(CallContext, itemId);
        if (user != null)
        {
            ucUserInfo1.ShowUser(user);
        }
        else
        {
            Response.Write("用户不存在，可能被删除");
            ucUserInfo1.Visible = false;
        }
    }

}
